<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/



use Illuminate\Support\Facades\Route;

Route::get('/', function () {
    return view('welcome');
});

//搜索文章
Route::post('/Article/search','Article\ArticleController@searchForArticles');
//获取所有专栏信息
Route::get('/Article/getColumns','Article\ArticleController@getColumns');
//通过专栏Id获取专栏信息
Route::post('/Article/getColumnById','Article\ArticleController@getColumnById');
//获取专栏下的所有标签
Route::post('/Article/getTagsById','Article\ArticleController@getTagsByColumnId');
//创建文章
Route::post('/Article/createArticle','Article\ArticleController@createArticle');




Route::group(["prefix"=>'admin','namespace'=>'admin'],function(){
    //获取所有用户信息
    Route::get('/getAllUsers','User_mangement@getAllUsers');
    //新增用户
    Route::post('/postAddUser','User_mangement@postAddUser');
    //重置密码
    Route::get('/getResetPass/{id}','User_mangement@getResetPass');
    //设置用户状态
    Route::post('/postSetStatus/{id}','User_mangement@postSetStatus');
    //软删除用户
    Route::get('/getSoftDelete/{id}','User_mangement@getSoftDelete');
    //恢复用户
    Route::get('/getRecovery/{id}','User_mangement@getRecovery');
    //硬删除用户
    Route::get('/getHardDelete/{id}','User_mangement@getHardDelete');
    //获取被软删除的用户信息
    Route::get('/getSoftDelUserInfo','User_mangement@getSoftDelUserInfo');
});

Route::any('/SpecialColumn','outline\ViewTheArticle@SpecialColumn');
Route::any('/ConterntMessage ','outline\ViewTheArticle@ConterntMessage');
Route::any('/ColumnMessage','outline\ViewTheArticle@ColumnMessage');
Route::post('/Thumbs','outline\ViewTheArticle@Thumbs');
Route::post('/CancelThumbs','outline\ViewTheArticle@CancelThumbs');

